/**
 * Creat with IntelliJ IDEA
 * Description:
 * User:WZW
 * Date:2022-04-23
 * Time:21:24
 */
public class Demo17 {

    public void method() {
        synchronized (this) { //锁当前对象

        }
    }

    public void method1() {
        synchronized (Demo17.class) { //锁类对象

        }
    }

    public synchronized static void method2() {

    }

    public static void main(String[] args) {

    }
}
